import org.junit.Test;

import jdk.javadoc.internal.doclets.formats.html.markup.Head;

public class MyTest{
    private class EmployeeTable{
        EmployeeLinkedList[] employeeLinkedListArray=new EmployeeLinkedList[10];
        public void add(int ID,String name){
            int idx=ID%10;
            if(employeeLinkedListArray[idx]==null){
                employeeLinkedListArray[idx]=new EmployeeLinkedList(ID, name);
            }else{
                employeeLinkedListArray[idx].add(ID, name);
            }    
        }
        public String find(int ID){
            int idx=ID%10;
            EmployeeLinkedList head=employeeLinkedListArray[idx];
            while(head!=null){
                if(head.ID==ID){
                    return head.name;
                }
                head=head.next;
            }
            return "";
        }
    }
    private class EmployeeLinkedList{
        int ID;
        String name;
        EmployeeLinkedList next;
        public EmployeeLinkedList(int ID,String name){
            this.ID=ID;
            this.name=name;
        }
        public void add(int ID,String name){
            EmployeeLinkedList head=this;
            while(head.next!=null){
                head=head.next;
            }
            head.next=new EmployeeLinkedList(ID, name);
        }
    }


    @Test
    public void test1(){
        EmployeeTable employeeTable=new EmployeeTable();
        employeeTable.add(1, "a");
        employeeTable.add(11, "b");
        System.out.println(employeeTable.find(11));
    }

}